{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import statsmodels.formula.api as smf\n",
    "from statsmodels.formula.api import ols\n",
    "import pdb\n",
    "#from regressors import stats\n",
    "from statsmodels.stats.outliers_influence import variance_inflation_factor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.         0.33333333 0.66666667 1.        ]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>GDP</th>\n",
       "      <th>y</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x2_diff</th>\n",
       "      <th>x2_diff2</th>\n",
       "      <th>x3</th>\n",
       "      <th>x41</th>\n",
       "      <th>x42</th>\n",
       "      <th>...</th>\n",
       "      <th>x167_diff</th>\n",
       "      <th>x18</th>\n",
       "      <th>x19</th>\n",
       "      <th>x20</th>\n",
       "      <th>x20_diff</th>\n",
       "      <th>x21</th>\n",
       "      <th>x22</th>\n",
       "      <th>x23</th>\n",
       "      <th>x24</th>\n",
       "      <th>x24_diff</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2014-03-01</td>\n",
       "      <td>8173.549149</td>\n",
       "      <td>9.008659</td>\n",
       "      <td>6.266041</td>\n",
       "      <td>7.826730</td>\n",
       "      <td>0.003800</td>\n",
       "      <td>0.120600</td>\n",
       "      <td>8.442704</td>\n",
       "      <td>8.103404</td>\n",
       "      <td>10.387952</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.009671</td>\n",
       "      <td>5.390033</td>\n",
       "      <td>7.889545</td>\n",
       "      <td>9.490387</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.665913</td>\n",
       "      <td>9.066736</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2014-06-01</td>\n",
       "      <td>9809.436579</td>\n",
       "      <td>9.191100</td>\n",
       "      <td>6.513495</td>\n",
       "      <td>8.049318</td>\n",
       "      <td>0.222588</td>\n",
       "      <td>0.218788</td>\n",
       "      <td>8.650919</td>\n",
       "      <td>8.436791</td>\n",
       "      <td>10.209559</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.042429</td>\n",
       "      <td>5.394162</td>\n",
       "      <td>8.046895</td>\n",
       "      <td>9.708583</td>\n",
       "      <td>0.218197</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.835378</td>\n",
       "      <td>9.182548</td>\n",
       "      <td>0.115812</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2014-09-01</td>\n",
       "      <td>9980.577105</td>\n",
       "      <td>9.208396</td>\n",
       "      <td>6.553665</td>\n",
       "      <td>8.056709</td>\n",
       "      <td>0.007390</td>\n",
       "      <td>-0.215198</td>\n",
       "      <td>8.695230</td>\n",
       "      <td>8.430949</td>\n",
       "      <td>10.432081</td>\n",
       "      <td>...</td>\n",
       "      <td>0.024460</td>\n",
       "      <td>5.426798</td>\n",
       "      <td>8.081899</td>\n",
       "      <td>9.722591</td>\n",
       "      <td>0.014007</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.107163</td>\n",
       "      <td>9.247077</td>\n",
       "      <td>0.064530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2014-12-01</td>\n",
       "      <td>12059.917551</td>\n",
       "      <td>9.397643</td>\n",
       "      <td>6.543770</td>\n",
       "      <td>8.066490</td>\n",
       "      <td>0.009781</td>\n",
       "      <td>0.002391</td>\n",
       "      <td>8.609951</td>\n",
       "      <td>8.356033</td>\n",
       "      <td>10.457456</td>\n",
       "      <td>...</td>\n",
       "      <td>0.059248</td>\n",
       "      <td>5.458402</td>\n",
       "      <td>8.164684</td>\n",
       "      <td>9.798750</td>\n",
       "      <td>0.076159</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.462094</td>\n",
       "      <td>9.315457</td>\n",
       "      <td>0.068380</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2015-03-01</td>\n",
       "      <td>9221.739669</td>\n",
       "      <td>9.129319</td>\n",
       "      <td>6.267120</td>\n",
       "      <td>7.838667</td>\n",
       "      <td>-0.227823</td>\n",
       "      <td>-0.237605</td>\n",
       "      <td>8.471102</td>\n",
       "      <td>8.228746</td>\n",
       "      <td>10.216362</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.024218</td>\n",
       "      <td>5.489038</td>\n",
       "      <td>7.897363</td>\n",
       "      <td>9.510760</td>\n",
       "      <td>-0.287990</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.805357</td>\n",
       "      <td>9.108839</td>\n",
       "      <td>-0.206618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2015-06-01</td>\n",
       "      <td>10354.088209</td>\n",
       "      <td>9.245137</td>\n",
       "      <td>6.534001</td>\n",
       "      <td>8.007017</td>\n",
       "      <td>0.168351</td>\n",
       "      <td>0.396174</td>\n",
       "      <td>8.579945</td>\n",
       "      <td>8.530081</td>\n",
       "      <td>10.447552</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.059958</td>\n",
       "      <td>5.518763</td>\n",
       "      <td>8.143340</td>\n",
       "      <td>9.716409</td>\n",
       "      <td>0.205649</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.416547</td>\n",
       "      <td>9.278149</td>\n",
       "      <td>0.169309</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2015-09-01</td>\n",
       "      <td>10161.038862</td>\n",
       "      <td>9.226316</td>\n",
       "      <td>6.526775</td>\n",
       "      <td>8.012157</td>\n",
       "      <td>0.005140</td>\n",
       "      <td>-0.163211</td>\n",
       "      <td>8.666237</td>\n",
       "      <td>8.507559</td>\n",
       "      <td>10.442440</td>\n",
       "      <td>...</td>\n",
       "      <td>0.023584</td>\n",
       "      <td>5.547630</td>\n",
       "      <td>8.102465</td>\n",
       "      <td>9.695342</td>\n",
       "      <td>-0.021067</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.335451</td>\n",
       "      <td>9.276381</td>\n",
       "      <td>-0.001768</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2015-12-01</td>\n",
       "      <td>13770.853260</td>\n",
       "      <td>9.530310</td>\n",
       "      <td>6.530887</td>\n",
       "      <td>8.036984</td>\n",
       "      <td>0.024827</td>\n",
       "      <td>0.019687</td>\n",
       "      <td>8.641887</td>\n",
       "      <td>8.383327</td>\n",
       "      <td>10.518627</td>\n",
       "      <td>...</td>\n",
       "      <td>0.053201</td>\n",
       "      <td>5.575687</td>\n",
       "      <td>8.232222</td>\n",
       "      <td>9.809727</td>\n",
       "      <td>0.114386</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.542017</td>\n",
       "      <td>9.339903</td>\n",
       "      <td>0.063522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2016-03-01</td>\n",
       "      <td>9862.022036</td>\n",
       "      <td>9.196447</td>\n",
       "      <td>6.310605</td>\n",
       "      <td>7.834915</td>\n",
       "      <td>-0.202069</td>\n",
       "      <td>-0.226896</td>\n",
       "      <td>8.425789</td>\n",
       "      <td>8.461419</td>\n",
       "      <td>10.197466</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.018444</td>\n",
       "      <td>5.602978</td>\n",
       "      <td>7.968240</td>\n",
       "      <td>9.537685</td>\n",
       "      <td>-0.272043</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.300041</td>\n",
       "      <td>9.143335</td>\n",
       "      <td>-0.196568</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2016-06-01</td>\n",
       "      <td>11269.368323</td>\n",
       "      <td>9.329844</td>\n",
       "      <td>6.569595</td>\n",
       "      <td>8.020708</td>\n",
       "      <td>0.185793</td>\n",
       "      <td>0.387862</td>\n",
       "      <td>8.647810</td>\n",
       "      <td>8.572557</td>\n",
       "      <td>10.548468</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.049697</td>\n",
       "      <td>5.629544</td>\n",
       "      <td>8.197255</td>\n",
       "      <td>9.752299</td>\n",
       "      <td>0.214615</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.769953</td>\n",
       "      <td>9.324704</td>\n",
       "      <td>0.181369</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2016-09-01</td>\n",
       "      <td>10998.155661</td>\n",
       "      <td>9.305483</td>\n",
       "      <td>6.585332</td>\n",
       "      <td>8.022890</td>\n",
       "      <td>0.002183</td>\n",
       "      <td>-0.183610</td>\n",
       "      <td>8.691009</td>\n",
       "      <td>8.658620</td>\n",
       "      <td>10.483231</td>\n",
       "      <td>...</td>\n",
       "      <td>0.026264</td>\n",
       "      <td>5.657070</td>\n",
       "      <td>8.166745</td>\n",
       "      <td>9.737975</td>\n",
       "      <td>-0.014325</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.759222</td>\n",
       "      <td>9.336286</td>\n",
       "      <td>0.011581</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2016-12-01</td>\n",
       "      <td>15124.493979</td>\n",
       "      <td>9.624071</td>\n",
       "      <td>6.650938</td>\n",
       "      <td>8.069151</td>\n",
       "      <td>0.046261</td>\n",
       "      <td>0.044078</td>\n",
       "      <td>8.698181</td>\n",
       "      <td>8.580334</td>\n",
       "      <td>10.636735</td>\n",
       "      <td>...</td>\n",
       "      <td>0.049818</td>\n",
       "      <td>5.685460</td>\n",
       "      <td>8.286073</td>\n",
       "      <td>9.863012</td>\n",
       "      <td>0.125038</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.801792</td>\n",
       "      <td>9.522549</td>\n",
       "      <td>0.186264</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2017-03-01</td>\n",
       "      <td>11260.527043</td>\n",
       "      <td>9.329059</td>\n",
       "      <td>6.403112</td>\n",
       "      <td>7.924040</td>\n",
       "      <td>-0.145112</td>\n",
       "      <td>-0.191373</td>\n",
       "      <td>8.629011</td>\n",
       "      <td>8.577826</td>\n",
       "      <td>10.352651</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.012462</td>\n",
       "      <td>5.713065</td>\n",
       "      <td>8.030145</td>\n",
       "      <td>9.613852</td>\n",
       "      <td>-0.249161</td>\n",
       "      <td>7.885946</td>\n",
       "      <td>7.803159</td>\n",
       "      <td>7.521296</td>\n",
       "      <td>9.363345</td>\n",
       "      <td>-0.159205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2017-06-01</td>\n",
       "      <td>12820.923272</td>\n",
       "      <td>9.458834</td>\n",
       "      <td>6.628625</td>\n",
       "      <td>8.130162</td>\n",
       "      <td>0.206122</td>\n",
       "      <td>0.351234</td>\n",
       "      <td>8.802603</td>\n",
       "      <td>8.690898</td>\n",
       "      <td>10.685090</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.036940</td>\n",
       "      <td>5.739930</td>\n",
       "      <td>8.252161</td>\n",
       "      <td>9.789056</td>\n",
       "      <td>0.175204</td>\n",
       "      <td>8.065793</td>\n",
       "      <td>8.065802</td>\n",
       "      <td>7.939562</td>\n",
       "      <td>9.519962</td>\n",
       "      <td>0.156618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2017-09-01</td>\n",
       "      <td>12576.905083</td>\n",
       "      <td>9.439617</td>\n",
       "      <td>6.719548</td>\n",
       "      <td>8.110193</td>\n",
       "      <td>-0.019969</td>\n",
       "      <td>-0.226092</td>\n",
       "      <td>8.781592</td>\n",
       "      <td>8.750994</td>\n",
       "      <td>10.648255</td>\n",
       "      <td>...</td>\n",
       "      <td>0.028878</td>\n",
       "      <td>5.770498</td>\n",
       "      <td>8.229591</td>\n",
       "      <td>9.778969</td>\n",
       "      <td>-0.010087</td>\n",
       "      <td>8.092857</td>\n",
       "      <td>8.050795</td>\n",
       "      <td>7.727623</td>\n",
       "      <td>9.552717</td>\n",
       "      <td>0.032754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2017-12-01</td>\n",
       "      <td>15744.774602</td>\n",
       "      <td>9.664264</td>\n",
       "      <td>6.681085</td>\n",
       "      <td>8.063217</td>\n",
       "      <td>-0.046976</td>\n",
       "      <td>-0.027006</td>\n",
       "      <td>8.831691</td>\n",
       "      <td>8.666386</td>\n",
       "      <td>10.665775</td>\n",
       "      <td>...</td>\n",
       "      <td>0.044971</td>\n",
       "      <td>5.804419</td>\n",
       "      <td>8.331695</td>\n",
       "      <td>9.891021</td>\n",
       "      <td>0.112052</td>\n",
       "      <td>8.336537</td>\n",
       "      <td>8.087275</td>\n",
       "      <td>7.892224</td>\n",
       "      <td>9.510778</td>\n",
       "      <td>-0.041938</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2018-03-01</td>\n",
       "      <td>12500.904859</td>\n",
       "      <td>9.433556</td>\n",
       "      <td>6.454557</td>\n",
       "      <td>7.815691</td>\n",
       "      <td>-0.247526</td>\n",
       "      <td>-0.200550</td>\n",
       "      <td>8.734118</td>\n",
       "      <td>8.651823</td>\n",
       "      <td>10.466293</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.019966</td>\n",
       "      <td>5.837227</td>\n",
       "      <td>8.089194</td>\n",
       "      <td>9.657499</td>\n",
       "      <td>-0.233523</td>\n",
       "      <td>8.105646</td>\n",
       "      <td>7.719520</td>\n",
       "      <td>7.532666</td>\n",
       "      <td>9.518847</td>\n",
       "      <td>0.008068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2018-06-01</td>\n",
       "      <td>14024.959955</td>\n",
       "      <td>9.548594</td>\n",
       "      <td>6.722089</td>\n",
       "      <td>7.966795</td>\n",
       "      <td>0.151104</td>\n",
       "      <td>0.398630</td>\n",
       "      <td>8.870484</td>\n",
       "      <td>8.777244</td>\n",
       "      <td>10.718629</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.037061</td>\n",
       "      <td>5.868993</td>\n",
       "      <td>8.309841</td>\n",
       "      <td>9.814157</td>\n",
       "      <td>0.156659</td>\n",
       "      <td>8.222285</td>\n",
       "      <td>7.893353</td>\n",
       "      <td>8.045229</td>\n",
       "      <td>9.669763</td>\n",
       "      <td>0.150917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2018-09-01</td>\n",
       "      <td>14797.511808</td>\n",
       "      <td>9.602214</td>\n",
       "      <td>6.780542</td>\n",
       "      <td>8.057377</td>\n",
       "      <td>0.090583</td>\n",
       "      <td>-0.060521</td>\n",
       "      <td>8.958564</td>\n",
       "      <td>8.839240</td>\n",
       "      <td>10.731633</td>\n",
       "      <td>...</td>\n",
       "      <td>0.023140</td>\n",
       "      <td>5.905246</td>\n",
       "      <td>8.276681</td>\n",
       "      <td>9.811521</td>\n",
       "      <td>-0.002636</td>\n",
       "      <td>8.160084</td>\n",
       "      <td>8.023069</td>\n",
       "      <td>7.706968</td>\n",
       "      <td>9.686991</td>\n",
       "      <td>0.017227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2018-12-01</td>\n",
       "      <td>16679.463378</td>\n",
       "      <td>9.721934</td>\n",
       "      <td>6.721266</td>\n",
       "      <td>8.052105</td>\n",
       "      <td>-0.005272</td>\n",
       "      <td>-0.095855</td>\n",
       "      <td>8.911270</td>\n",
       "      <td>8.740820</td>\n",
       "      <td>10.771663</td>\n",
       "      <td>...</td>\n",
       "      <td>0.019946</td>\n",
       "      <td>5.945481</td>\n",
       "      <td>8.358024</td>\n",
       "      <td>9.903152</td>\n",
       "      <td>0.091630</td>\n",
       "      <td>8.414243</td>\n",
       "      <td>8.111863</td>\n",
       "      <td>7.841788</td>\n",
       "      <td>9.741804</td>\n",
       "      <td>0.054813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2019-03-01</td>\n",
       "      <td>13746.208200</td>\n",
       "      <td>9.528518</td>\n",
       "      <td>6.478617</td>\n",
       "      <td>7.895250</td>\n",
       "      <td>-0.156856</td>\n",
       "      <td>-0.151584</td>\n",
       "      <td>8.800214</td>\n",
       "      <td>8.737684</td>\n",
       "      <td>10.523674</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.024838</td>\n",
       "      <td>5.984159</td>\n",
       "      <td>8.154385</td>\n",
       "      <td>9.675966</td>\n",
       "      <td>-0.227186</td>\n",
       "      <td>8.247914</td>\n",
       "      <td>7.836903</td>\n",
       "      <td>7.388989</td>\n",
       "      <td>9.702099</td>\n",
       "      <td>-0.039704</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2019-06-01</td>\n",
       "      <td>15291.328500</td>\n",
       "      <td>9.635041</td>\n",
       "      <td>6.710568</td>\n",
       "      <td>8.026824</td>\n",
       "      <td>0.131574</td>\n",
       "      <td>0.288429</td>\n",
       "      <td>8.916509</td>\n",
       "      <td>8.886566</td>\n",
       "      <td>10.776203</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.052819</td>\n",
       "      <td>6.021397</td>\n",
       "      <td>8.296108</td>\n",
       "      <td>9.769750</td>\n",
       "      <td>0.093785</td>\n",
       "      <td>8.340358</td>\n",
       "      <td>8.101902</td>\n",
       "      <td>7.960844</td>\n",
       "      <td>9.814525</td>\n",
       "      <td>0.112426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2019-09-01</td>\n",
       "      <td>15898.690600</td>\n",
       "      <td>9.673992</td>\n",
       "      <td>6.792549</td>\n",
       "      <td>8.049108</td>\n",
       "      <td>0.022284</td>\n",
       "      <td>-0.109290</td>\n",
       "      <td>9.028938</td>\n",
       "      <td>8.948516</td>\n",
       "      <td>10.792899</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.016012</td>\n",
       "      <td>6.052049</td>\n",
       "      <td>8.320796</td>\n",
       "      <td>9.806156</td>\n",
       "      <td>0.036405</td>\n",
       "      <td>8.339365</td>\n",
       "      <td>8.205513</td>\n",
       "      <td>7.765238</td>\n",
       "      <td>9.364262</td>\n",
       "      <td>-0.450263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2019-12-01</td>\n",
       "      <td>17525.759000</td>\n",
       "      <td>9.771427</td>\n",
       "      <td>6.780160</td>\n",
       "      <td>8.034048</td>\n",
       "      <td>-0.015060</td>\n",
       "      <td>-0.037344</td>\n",
       "      <td>9.036131</td>\n",
       "      <td>8.831396</td>\n",
       "      <td>10.844187</td>\n",
       "      <td>...</td>\n",
       "      <td>0.016951</td>\n",
       "      <td>6.076667</td>\n",
       "      <td>8.421019</td>\n",
       "      <td>9.894765</td>\n",
       "      <td>0.088609</td>\n",
       "      <td>8.714331</td>\n",
       "      <td>8.340391</td>\n",
       "      <td>7.838552</td>\n",
       "      <td>10.209497</td>\n",
       "      <td>0.845234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2020-03-01</td>\n",
       "      <td>13118.619000</td>\n",
       "      <td>9.481788</td>\n",
       "      <td>6.261448</td>\n",
       "      <td>7.743447</td>\n",
       "      <td>-0.290600</td>\n",
       "      <td>-0.275540</td>\n",
       "      <td>8.747717</td>\n",
       "      <td>8.069321</td>\n",
       "      <td>10.316623</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.063459</td>\n",
       "      <td>6.100694</td>\n",
       "      <td>8.063803</td>\n",
       "      <td>9.481710</td>\n",
       "      <td>-0.413054</td>\n",
       "      <td>8.308963</td>\n",
       "      <td>7.761259</td>\n",
       "      <td>7.205412</td>\n",
       "      <td>9.602376</td>\n",
       "      <td>-0.607121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2020-06-01</td>\n",
       "      <td>15924.495500</td>\n",
       "      <td>9.675614</td>\n",
       "      <td>6.771893</td>\n",
       "      <td>7.977153</td>\n",
       "      <td>0.233706</td>\n",
       "      <td>0.524306</td>\n",
       "      <td>9.040323</td>\n",
       "      <td>8.377218</td>\n",
       "      <td>10.833200</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.059554</td>\n",
       "      <td>6.124157</td>\n",
       "      <td>8.376650</td>\n",
       "      <td>9.841165</td>\n",
       "      <td>0.359455</td>\n",
       "      <td>8.531676</td>\n",
       "      <td>8.234806</td>\n",
       "      <td>8.071109</td>\n",
       "      <td>9.984740</td>\n",
       "      <td>0.382365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2020-09-01</td>\n",
       "      <td>16666.081900</td>\n",
       "      <td>9.721131</td>\n",
       "      <td>6.856591</td>\n",
       "      <td>8.107328</td>\n",
       "      <td>0.130175</td>\n",
       "      <td>-0.103531</td>\n",
       "      <td>9.179623</td>\n",
       "      <td>8.719646</td>\n",
       "      <td>10.917506</td>\n",
       "      <td>...</td>\n",
       "      <td>0.042132</td>\n",
       "      <td>6.153309</td>\n",
       "      <td>8.391258</td>\n",
       "      <td>9.890580</td>\n",
       "      <td>0.049414</td>\n",
       "      <td>8.606465</td>\n",
       "      <td>8.187835</td>\n",
       "      <td>7.874804</td>\n",
       "      <td>10.040271</td>\n",
       "      <td>0.055531</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2020-12-01</td>\n",
       "      <td>18979.867289</td>\n",
       "      <td>9.851134</td>\n",
       "      <td>6.859935</td>\n",
       "      <td>8.186771</td>\n",
       "      <td>0.079442</td>\n",
       "      <td>-0.050733</td>\n",
       "      <td>9.149858</td>\n",
       "      <td>8.722346</td>\n",
       "      <td>10.958312</td>\n",
       "      <td>...</td>\n",
       "      <td>0.038960</td>\n",
       "      <td>6.187652</td>\n",
       "      <td>8.523269</td>\n",
       "      <td>10.015731</td>\n",
       "      <td>0.125151</td>\n",
       "      <td>8.858408</td>\n",
       "      <td>8.465818</td>\n",
       "      <td>8.030338</td>\n",
       "      <td>10.159141</td>\n",
       "      <td>0.118870</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2021-03-01</td>\n",
       "      <td>16273.314400</td>\n",
       "      <td>9.697282</td>\n",
       "      <td>6.660558</td>\n",
       "      <td>8.075925</td>\n",
       "      <td>-0.110846</td>\n",
       "      <td>-0.190288</td>\n",
       "      <td>9.061086</td>\n",
       "      <td>8.468740</td>\n",
       "      <td>10.632316</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.008099</td>\n",
       "      <td>6.220854</td>\n",
       "      <td>8.388785</td>\n",
       "      <td>9.858825</td>\n",
       "      <td>-0.156906</td>\n",
       "      <td>8.651983</td>\n",
       "      <td>8.107396</td>\n",
       "      <td>7.863621</td>\n",
       "      <td>10.073365</td>\n",
       "      <td>-0.085776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2021-06-01</td>\n",
       "      <td>18137.491900</td>\n",
       "      <td>9.805736</td>\n",
       "      <td>6.890753</td>\n",
       "      <td>8.235599</td>\n",
       "      <td>0.159674</td>\n",
       "      <td>0.270520</td>\n",
       "      <td>9.265841</td>\n",
       "      <td>8.854006</td>\n",
       "      <td>10.961106</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.013044</td>\n",
       "      <td>6.252989</td>\n",
       "      <td>8.551038</td>\n",
       "      <td>10.051520</td>\n",
       "      <td>0.192695</td>\n",
       "      <td>8.772798</td>\n",
       "      <td>8.342526</td>\n",
       "      <td>8.158456</td>\n",
       "      <td>10.298673</td>\n",
       "      <td>0.225308</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>2021-09-01</td>\n",
       "      <td>18238.748600</td>\n",
       "      <td>9.811304</td>\n",
       "      <td>6.956559</td>\n",
       "      <td>8.277158</td>\n",
       "      <td>0.041559</td>\n",
       "      <td>-0.118116</td>\n",
       "      <td>9.282531</td>\n",
       "      <td>8.704541</td>\n",
       "      <td>10.992627</td>\n",
       "      <td>...</td>\n",
       "      <td>0.027543</td>\n",
       "      <td>6.285659</td>\n",
       "      <td>8.547552</td>\n",
       "      <td>10.060004</td>\n",
       "      <td>0.008484</td>\n",
       "      <td>8.795129</td>\n",
       "      <td>8.321944</td>\n",
       "      <td>7.617351</td>\n",
       "      <td>10.252133</td>\n",
       "      <td>-0.046540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>2021-12-01</td>\n",
       "      <td>20866.202800</td>\n",
       "      <td>9.945886</td>\n",
       "      <td>6.860005</td>\n",
       "      <td>8.378069</td>\n",
       "      <td>0.100911</td>\n",
       "      <td>0.059353</td>\n",
       "      <td>9.347508</td>\n",
       "      <td>8.480760</td>\n",
       "      <td>10.961281</td>\n",
       "      <td>...</td>\n",
       "      <td>0.027326</td>\n",
       "      <td>6.318780</td>\n",
       "      <td>8.644478</td>\n",
       "      <td>10.153752</td>\n",
       "      <td>0.093748</td>\n",
       "      <td>9.005747</td>\n",
       "      <td>8.465016</td>\n",
       "      <td>7.530357</td>\n",
       "      <td>10.330381</td>\n",
       "      <td>0.078248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2022-03-01</td>\n",
       "      <td>17886.386900</td>\n",
       "      <td>9.791795</td>\n",
       "      <td>6.719769</td>\n",
       "      <td>8.307953</td>\n",
       "      <td>-0.070117</td>\n",
       "      <td>-0.171028</td>\n",
       "      <td>9.283219</td>\n",
       "      <td>8.268384</td>\n",
       "      <td>10.698489</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.007372</td>\n",
       "      <td>6.350839</td>\n",
       "      <td>8.578260</td>\n",
       "      <td>10.037280</td>\n",
       "      <td>-0.116472</td>\n",
       "      <td>8.783024</td>\n",
       "      <td>8.228220</td>\n",
       "      <td>7.394462</td>\n",
       "      <td>7.859645</td>\n",
       "      <td>-2.470736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>2022-06-01</td>\n",
       "      <td>19431.330177</td>\n",
       "      <td>9.874642</td>\n",
       "      <td>6.811531</td>\n",
       "      <td>8.351918</td>\n",
       "      <td>0.043965</td>\n",
       "      <td>0.114081</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.961206</td>\n",
       "      <td>10.892502</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.375112</td>\n",
       "      <td>8.609723</td>\n",
       "      <td>10.067288</td>\n",
       "      <td>0.030008</td>\n",
       "      <td>8.875946</td>\n",
       "      <td>8.330746</td>\n",
       "      <td>7.466046</td>\n",
       "      <td>8.921300</td>\n",
       "      <td>1.061655</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>34 rows × 45 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         date           GDP         y        x1        x2   x2_diff  x2_diff2  \\\n",
       "0  2014-03-01   8173.549149  9.008659  6.266041  7.826730  0.003800  0.120600   \n",
       "1  2014-06-01   9809.436579  9.191100  6.513495  8.049318  0.222588  0.218788   \n",
       "2  2014-09-01   9980.577105  9.208396  6.553665  8.056709  0.007390 -0.215198   \n",
       "3  2014-12-01  12059.917551  9.397643  6.543770  8.066490  0.009781  0.002391   \n",
       "4  2015-03-01   9221.739669  9.129319  6.267120  7.838667 -0.227823 -0.237605   \n",
       "5  2015-06-01  10354.088209  9.245137  6.534001  8.007017  0.168351  0.396174   \n",
       "6  2015-09-01  10161.038862  9.226316  6.526775  8.012157  0.005140 -0.163211   \n",
       "7  2015-12-01  13770.853260  9.530310  6.530887  8.036984  0.024827  0.019687   \n",
       "8  2016-03-01   9862.022036  9.196447  6.310605  7.834915 -0.202069 -0.226896   \n",
       "9  2016-06-01  11269.368323  9.329844  6.569595  8.020708  0.185793  0.387862   \n",
       "10 2016-09-01  10998.155661  9.305483  6.585332  8.022890  0.002183 -0.183610   \n",
       "11 2016-12-01  15124.493979  9.624071  6.650938  8.069151  0.046261  0.044078   \n",
       "12 2017-03-01  11260.527043  9.329059  6.403112  7.924040 -0.145112 -0.191373   \n",
       "13 2017-06-01  12820.923272  9.458834  6.628625  8.130162  0.206122  0.351234   \n",
       "14 2017-09-01  12576.905083  9.439617  6.719548  8.110193 -0.019969 -0.226092   \n",
       "15 2017-12-01  15744.774602  9.664264  6.681085  8.063217 -0.046976 -0.027006   \n",
       "16 2018-03-01  12500.904859  9.433556  6.454557  7.815691 -0.247526 -0.200550   \n",
       "17 2018-06-01  14024.959955  9.548594  6.722089  7.966795  0.151104  0.398630   \n",
       "18 2018-09-01  14797.511808  9.602214  6.780542  8.057377  0.090583 -0.060521   \n",
       "19 2018-12-01  16679.463378  9.721934  6.721266  8.052105 -0.005272 -0.095855   \n",
       "20 2019-03-01  13746.208200  9.528518  6.478617  7.895250 -0.156856 -0.151584   \n",
       "21 2019-06-01  15291.328500  9.635041  6.710568  8.026824  0.131574  0.288429   \n",
       "22 2019-09-01  15898.690600  9.673992  6.792549  8.049108  0.022284 -0.109290   \n",
       "23 2019-12-01  17525.759000  9.771427  6.780160  8.034048 -0.015060 -0.037344   \n",
       "24 2020-03-01  13118.619000  9.481788  6.261448  7.743447 -0.290600 -0.275540   \n",
       "25 2020-06-01  15924.495500  9.675614  6.771893  7.977153  0.233706  0.524306   \n",
       "26 2020-09-01  16666.081900  9.721131  6.856591  8.107328  0.130175 -0.103531   \n",
       "27 2020-12-01  18979.867289  9.851134  6.859935  8.186771  0.079442 -0.050733   \n",
       "28 2021-03-01  16273.314400  9.697282  6.660558  8.075925 -0.110846 -0.190288   \n",
       "29 2021-06-01  18137.491900  9.805736  6.890753  8.235599  0.159674  0.270520   \n",
       "30 2021-09-01  18238.748600  9.811304  6.956559  8.277158  0.041559 -0.118116   \n",
       "31 2021-12-01  20866.202800  9.945886  6.860005  8.378069  0.100911  0.059353   \n",
       "32 2022-03-01  17886.386900  9.791795  6.719769  8.307953 -0.070117 -0.171028   \n",
       "33 2022-06-01  19431.330177  9.874642  6.811531  8.351918  0.043965  0.114081   \n",
       "\n",
       "          x3       x41        x42  ...  x167_diff       x18       x19  \\\n",
       "0   8.442704  8.103404  10.387952  ...  -0.009671  5.390033  7.889545   \n",
       "1   8.650919  8.436791  10.209559  ...  -0.042429  5.394162  8.046895   \n",
       "2   8.695230  8.430949  10.432081  ...   0.024460  5.426798  8.081899   \n",
       "3   8.609951  8.356033  10.457456  ...   0.059248  5.458402  8.164684   \n",
       "4   8.471102  8.228746  10.216362  ...  -0.024218  5.489038  7.897363   \n",
       "5   8.579945  8.530081  10.447552  ...  -0.059958  5.518763  8.143340   \n",
       "6   8.666237  8.507559  10.442440  ...   0.023584  5.547630  8.102465   \n",
       "7   8.641887  8.383327  10.518627  ...   0.053201  5.575687  8.232222   \n",
       "8   8.425789  8.461419  10.197466  ...  -0.018444  5.602978  7.968240   \n",
       "9   8.647810  8.572557  10.548468  ...  -0.049697  5.629544  8.197255   \n",
       "10  8.691009  8.658620  10.483231  ...   0.026264  5.657070  8.166745   \n",
       "11  8.698181  8.580334  10.636735  ...   0.049818  5.685460  8.286073   \n",
       "12  8.629011  8.577826  10.352651  ...  -0.012462  5.713065  8.030145   \n",
       "13  8.802603  8.690898  10.685090  ...  -0.036940  5.739930  8.252161   \n",
       "14  8.781592  8.750994  10.648255  ...   0.028878  5.770498  8.229591   \n",
       "15  8.831691  8.666386  10.665775  ...   0.044971  5.804419  8.331695   \n",
       "16  8.734118  8.651823  10.466293  ...  -0.019966  5.837227  8.089194   \n",
       "17  8.870484  8.777244  10.718629  ...  -0.037061  5.868993  8.309841   \n",
       "18  8.958564  8.839240  10.731633  ...   0.023140  5.905246  8.276681   \n",
       "19  8.911270  8.740820  10.771663  ...   0.019946  5.945481  8.358024   \n",
       "20  8.800214  8.737684  10.523674  ...  -0.024838  5.984159  8.154385   \n",
       "21  8.916509  8.886566  10.776203  ...  -0.052819  6.021397  8.296108   \n",
       "22  9.028938  8.948516  10.792899  ...  -0.016012  6.052049  8.320796   \n",
       "23  9.036131  8.831396  10.844187  ...   0.016951  6.076667  8.421019   \n",
       "24  8.747717  8.069321  10.316623  ...  -0.063459  6.100694  8.063803   \n",
       "25  9.040323  8.377218  10.833200  ...  -0.059554  6.124157  8.376650   \n",
       "26  9.179623  8.719646  10.917506  ...   0.042132  6.153309  8.391258   \n",
       "27  9.149858  8.722346  10.958312  ...   0.038960  6.187652  8.523269   \n",
       "28  9.061086  8.468740  10.632316  ...  -0.008099  6.220854  8.388785   \n",
       "29  9.265841  8.854006  10.961106  ...  -0.013044  6.252989  8.551038   \n",
       "30  9.282531  8.704541  10.992627  ...   0.027543  6.285659  8.547552   \n",
       "31  9.347508  8.480760  10.961281  ...   0.027326  6.318780  8.644478   \n",
       "32  9.283219  8.268384  10.698489  ...  -0.007372  6.350839  8.578260   \n",
       "33       NaN  7.961206  10.892502  ...        NaN  6.375112  8.609723   \n",
       "\n",
       "          x20  x20_diff       x21       x22       x23        x24  x24_diff  \n",
       "0    9.490387       NaN       NaN       NaN  6.665913   9.066736       NaN  \n",
       "1    9.708583  0.218197       NaN       NaN  6.835378   9.182548  0.115812  \n",
       "2    9.722591  0.014007       NaN       NaN  7.107163   9.247077  0.064530  \n",
       "3    9.798750  0.076159       NaN       NaN  7.462094   9.315457  0.068380  \n",
       "4    9.510760 -0.287990       NaN       NaN  6.805357   9.108839 -0.206618  \n",
       "5    9.716409  0.205649       NaN       NaN  7.416547   9.278149  0.169309  \n",
       "6    9.695342 -0.021067       NaN       NaN  7.335451   9.276381 -0.001768  \n",
       "7    9.809727  0.114386       NaN       NaN  7.542017   9.339903  0.063522  \n",
       "8    9.537685 -0.272043       NaN       NaN  7.300041   9.143335 -0.196568  \n",
       "9    9.752299  0.214615       NaN       NaN  7.769953   9.324704  0.181369  \n",
       "10   9.737975 -0.014325       NaN       NaN  7.759222   9.336286  0.011581  \n",
       "11   9.863012  0.125038       NaN       NaN  7.801792   9.522549  0.186264  \n",
       "12   9.613852 -0.249161  7.885946  7.803159  7.521296   9.363345 -0.159205  \n",
       "13   9.789056  0.175204  8.065793  8.065802  7.939562   9.519962  0.156618  \n",
       "14   9.778969 -0.010087  8.092857  8.050795  7.727623   9.552717  0.032754  \n",
       "15   9.891021  0.112052  8.336537  8.087275  7.892224   9.510778 -0.041938  \n",
       "16   9.657499 -0.233523  8.105646  7.719520  7.532666   9.518847  0.008068  \n",
       "17   9.814157  0.156659  8.222285  7.893353  8.045229   9.669763  0.150917  \n",
       "18   9.811521 -0.002636  8.160084  8.023069  7.706968   9.686991  0.017227  \n",
       "19   9.903152  0.091630  8.414243  8.111863  7.841788   9.741804  0.054813  \n",
       "20   9.675966 -0.227186  8.247914  7.836903  7.388989   9.702099 -0.039704  \n",
       "21   9.769750  0.093785  8.340358  8.101902  7.960844   9.814525  0.112426  \n",
       "22   9.806156  0.036405  8.339365  8.205513  7.765238   9.364262 -0.450263  \n",
       "23   9.894765  0.088609  8.714331  8.340391  7.838552  10.209497  0.845234  \n",
       "24   9.481710 -0.413054  8.308963  7.761259  7.205412   9.602376 -0.607121  \n",
       "25   9.841165  0.359455  8.531676  8.234806  8.071109   9.984740  0.382365  \n",
       "26   9.890580  0.049414  8.606465  8.187835  7.874804  10.040271  0.055531  \n",
       "27  10.015731  0.125151  8.858408  8.465818  8.030338  10.159141  0.118870  \n",
       "28   9.858825 -0.156906  8.651983  8.107396  7.863621  10.073365 -0.085776  \n",
       "29  10.051520  0.192695  8.772798  8.342526  8.158456  10.298673  0.225308  \n",
       "30  10.060004  0.008484  8.795129  8.321944  7.617351  10.252133 -0.046540  \n",
       "31  10.153752  0.093748  9.005747  8.465016  7.530357  10.330381  0.078248  \n",
       "32  10.037280 -0.116472  8.783024  8.228220  7.394462   7.859645 -2.470736  \n",
       "33  10.067288  0.030008  8.875946  8.330746  7.466046   8.921300  1.061655  \n",
       "\n",
       "[34 rows x 45 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "df = pd.read_excel('E:/data.xlsx')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>GDP</th>\n",
       "      <th>y</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x2_diff</th>\n",
       "      <th>x2_diff2</th>\n",
       "      <th>x3</th>\n",
       "      <th>x41</th>\n",
       "      <th>x42</th>\n",
       "      <th>...</th>\n",
       "      <th>x167_diff</th>\n",
       "      <th>x18</th>\n",
       "      <th>x19</th>\n",
       "      <th>x20</th>\n",
       "      <th>x20_diff</th>\n",
       "      <th>x21</th>\n",
       "      <th>x22</th>\n",
       "      <th>x23</th>\n",
       "      <th>x24</th>\n",
       "      <th>x24_diff</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2017-03-01</td>\n",
       "      <td>11260.527043</td>\n",
       "      <td>9.329059</td>\n",
       "      <td>6.403112</td>\n",
       "      <td>7.924040</td>\n",
       "      <td>-0.145112</td>\n",
       "      <td>-0.191373</td>\n",
       "      <td>8.629011</td>\n",
       "      <td>8.577826</td>\n",
       "      <td>10.352651</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.012462</td>\n",
       "      <td>5.713065</td>\n",
       "      <td>8.030145</td>\n",
       "      <td>9.613852</td>\n",
       "      <td>-0.249161</td>\n",
       "      <td>7.885946</td>\n",
       "      <td>7.803159</td>\n",
       "      <td>7.521296</td>\n",
       "      <td>9.363345</td>\n",
       "      <td>-0.159205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2017-06-01</td>\n",
       "      <td>12820.923272</td>\n",
       "      <td>9.458834</td>\n",
       "      <td>6.628625</td>\n",
       "      <td>8.130162</td>\n",
       "      <td>0.206122</td>\n",
       "      <td>0.351234</td>\n",
       "      <td>8.802603</td>\n",
       "      <td>8.690898</td>\n",
       "      <td>10.685090</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.036940</td>\n",
       "      <td>5.739930</td>\n",
       "      <td>8.252161</td>\n",
       "      <td>9.789056</td>\n",
       "      <td>0.175204</td>\n",
       "      <td>8.065793</td>\n",
       "      <td>8.065802</td>\n",
       "      <td>7.939562</td>\n",
       "      <td>9.519962</td>\n",
       "      <td>0.156618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2017-09-01</td>\n",
       "      <td>12576.905083</td>\n",
       "      <td>9.439617</td>\n",
       "      <td>6.719548</td>\n",
       "      <td>8.110193</td>\n",
       "      <td>-0.019969</td>\n",
       "      <td>-0.226092</td>\n",
       "      <td>8.781592</td>\n",
       "      <td>8.750994</td>\n",
       "      <td>10.648255</td>\n",
       "      <td>...</td>\n",
       "      <td>0.028878</td>\n",
       "      <td>5.770498</td>\n",
       "      <td>8.229591</td>\n",
       "      <td>9.778969</td>\n",
       "      <td>-0.010087</td>\n",
       "      <td>8.092857</td>\n",
       "      <td>8.050795</td>\n",
       "      <td>7.727623</td>\n",
       "      <td>9.552717</td>\n",
       "      <td>0.032754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2017-12-01</td>\n",
       "      <td>15744.774602</td>\n",
       "      <td>9.664264</td>\n",
       "      <td>6.681085</td>\n",
       "      <td>8.063217</td>\n",
       "      <td>-0.046976</td>\n",
       "      <td>-0.027006</td>\n",
       "      <td>8.831691</td>\n",
       "      <td>8.666386</td>\n",
       "      <td>10.665775</td>\n",
       "      <td>...</td>\n",
       "      <td>0.044971</td>\n",
       "      <td>5.804419</td>\n",
       "      <td>8.331695</td>\n",
       "      <td>9.891021</td>\n",
       "      <td>0.112052</td>\n",
       "      <td>8.336537</td>\n",
       "      <td>8.087275</td>\n",
       "      <td>7.892224</td>\n",
       "      <td>9.510778</td>\n",
       "      <td>-0.041938</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2018-03-01</td>\n",
       "      <td>12500.904859</td>\n",
       "      <td>9.433556</td>\n",
       "      <td>6.454557</td>\n",
       "      <td>7.815691</td>\n",
       "      <td>-0.247526</td>\n",
       "      <td>-0.200550</td>\n",
       "      <td>8.734118</td>\n",
       "      <td>8.651823</td>\n",
       "      <td>10.466293</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.019966</td>\n",
       "      <td>5.837227</td>\n",
       "      <td>8.089194</td>\n",
       "      <td>9.657499</td>\n",
       "      <td>-0.233523</td>\n",
       "      <td>8.105646</td>\n",
       "      <td>7.719520</td>\n",
       "      <td>7.532666</td>\n",
       "      <td>9.518847</td>\n",
       "      <td>0.008068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2018-06-01</td>\n",
       "      <td>14024.959955</td>\n",
       "      <td>9.548594</td>\n",
       "      <td>6.722089</td>\n",
       "      <td>7.966795</td>\n",
       "      <td>0.151104</td>\n",
       "      <td>0.398630</td>\n",
       "      <td>8.870484</td>\n",
       "      <td>8.777244</td>\n",
       "      <td>10.718629</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.037061</td>\n",
       "      <td>5.868993</td>\n",
       "      <td>8.309841</td>\n",
       "      <td>9.814157</td>\n",
       "      <td>0.156659</td>\n",
       "      <td>8.222285</td>\n",
       "      <td>7.893353</td>\n",
       "      <td>8.045229</td>\n",
       "      <td>9.669763</td>\n",
       "      <td>0.150917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2018-09-01</td>\n",
       "      <td>14797.511808</td>\n",
       "      <td>9.602214</td>\n",
       "      <td>6.780542</td>\n",
       "      <td>8.057377</td>\n",
       "      <td>0.090583</td>\n",
       "      <td>-0.060521</td>\n",
       "      <td>8.958564</td>\n",
       "      <td>8.839240</td>\n",
       "      <td>10.731633</td>\n",
       "      <td>...</td>\n",
       "      <td>0.023140</td>\n",
       "      <td>5.905246</td>\n",
       "      <td>8.276681</td>\n",
       "      <td>9.811521</td>\n",
       "      <td>-0.002636</td>\n",
       "      <td>8.160084</td>\n",
       "      <td>8.023069</td>\n",
       "      <td>7.706968</td>\n",
       "      <td>9.686991</td>\n",
       "      <td>0.017227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2018-12-01</td>\n",
       "      <td>16679.463378</td>\n",
       "      <td>9.721934</td>\n",
       "      <td>6.721266</td>\n",
       "      <td>8.052105</td>\n",
       "      <td>-0.005272</td>\n",
       "      <td>-0.095855</td>\n",
       "      <td>8.911270</td>\n",
       "      <td>8.740820</td>\n",
       "      <td>10.771663</td>\n",
       "      <td>...</td>\n",
       "      <td>0.019946</td>\n",
       "      <td>5.945481</td>\n",
       "      <td>8.358024</td>\n",
       "      <td>9.903152</td>\n",
       "      <td>0.091630</td>\n",
       "      <td>8.414243</td>\n",
       "      <td>8.111863</td>\n",
       "      <td>7.841788</td>\n",
       "      <td>9.741804</td>\n",
       "      <td>0.054813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2019-03-01</td>\n",
       "      <td>13746.208200</td>\n",
       "      <td>9.528518</td>\n",
       "      <td>6.478617</td>\n",
       "      <td>7.895250</td>\n",
       "      <td>-0.156856</td>\n",
       "      <td>-0.151584</td>\n",
       "      <td>8.800214</td>\n",
       "      <td>8.737684</td>\n",
       "      <td>10.523674</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.024838</td>\n",
       "      <td>5.984159</td>\n",
       "      <td>8.154385</td>\n",
       "      <td>9.675966</td>\n",
       "      <td>-0.227186</td>\n",
       "      <td>8.247914</td>\n",
       "      <td>7.836903</td>\n",
       "      <td>7.388989</td>\n",
       "      <td>9.702099</td>\n",
       "      <td>-0.039704</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2019-06-01</td>\n",
       "      <td>15291.328500</td>\n",
       "      <td>9.635041</td>\n",
       "      <td>6.710568</td>\n",
       "      <td>8.026824</td>\n",
       "      <td>0.131574</td>\n",
       "      <td>0.288429</td>\n",
       "      <td>8.916509</td>\n",
       "      <td>8.886566</td>\n",
       "      <td>10.776203</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.052819</td>\n",
       "      <td>6.021397</td>\n",
       "      <td>8.296108</td>\n",
       "      <td>9.769750</td>\n",
       "      <td>0.093785</td>\n",
       "      <td>8.340358</td>\n",
       "      <td>8.101902</td>\n",
       "      <td>7.960844</td>\n",
       "      <td>9.814525</td>\n",
       "      <td>0.112426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2019-09-01</td>\n",
       "      <td>15898.690600</td>\n",
       "      <td>9.673992</td>\n",
       "      <td>6.792549</td>\n",
       "      <td>8.049108</td>\n",
       "      <td>0.022284</td>\n",
       "      <td>-0.109290</td>\n",
       "      <td>9.028938</td>\n",
       "      <td>8.948516</td>\n",
       "      <td>10.792899</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.016012</td>\n",
       "      <td>6.052049</td>\n",
       "      <td>8.320796</td>\n",
       "      <td>9.806156</td>\n",
       "      <td>0.036405</td>\n",
       "      <td>8.339365</td>\n",
       "      <td>8.205513</td>\n",
       "      <td>7.765238</td>\n",
       "      <td>9.364262</td>\n",
       "      <td>-0.450263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2019-12-01</td>\n",
       "      <td>17525.759000</td>\n",
       "      <td>9.771427</td>\n",
       "      <td>6.780160</td>\n",
       "      <td>8.034048</td>\n",
       "      <td>-0.015060</td>\n",
       "      <td>-0.037344</td>\n",
       "      <td>9.036131</td>\n",
       "      <td>8.831396</td>\n",
       "      <td>10.844187</td>\n",
       "      <td>...</td>\n",
       "      <td>0.016951</td>\n",
       "      <td>6.076667</td>\n",
       "      <td>8.421019</td>\n",
       "      <td>9.894765</td>\n",
       "      <td>0.088609</td>\n",
       "      <td>8.714331</td>\n",
       "      <td>8.340391</td>\n",
       "      <td>7.838552</td>\n",
       "      <td>10.209497</td>\n",
       "      <td>0.845234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2020-03-01</td>\n",
       "      <td>13118.619000</td>\n",
       "      <td>9.481788</td>\n",
       "      <td>6.261448</td>\n",
       "      <td>7.743447</td>\n",
       "      <td>-0.290600</td>\n",
       "      <td>-0.275540</td>\n",
       "      <td>8.747717</td>\n",
       "      <td>8.069321</td>\n",
       "      <td>10.316623</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.063459</td>\n",
       "      <td>6.100694</td>\n",
       "      <td>8.063803</td>\n",
       "      <td>9.481710</td>\n",
       "      <td>-0.413054</td>\n",
       "      <td>8.308963</td>\n",
       "      <td>7.761259</td>\n",
       "      <td>7.205412</td>\n",
       "      <td>9.602376</td>\n",
       "      <td>-0.607121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2020-06-01</td>\n",
       "      <td>15924.495500</td>\n",
       "      <td>9.675614</td>\n",
       "      <td>6.771893</td>\n",
       "      <td>7.977153</td>\n",
       "      <td>0.233706</td>\n",
       "      <td>0.524306</td>\n",
       "      <td>9.040323</td>\n",
       "      <td>8.377218</td>\n",
       "      <td>10.833200</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.059554</td>\n",
       "      <td>6.124157</td>\n",
       "      <td>8.376650</td>\n",
       "      <td>9.841165</td>\n",
       "      <td>0.359455</td>\n",
       "      <td>8.531676</td>\n",
       "      <td>8.234806</td>\n",
       "      <td>8.071109</td>\n",
       "      <td>9.984740</td>\n",
       "      <td>0.382365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2020-09-01</td>\n",
       "      <td>16666.081900</td>\n",
       "      <td>9.721131</td>\n",
       "      <td>6.856591</td>\n",
       "      <td>8.107328</td>\n",
       "      <td>0.130175</td>\n",
       "      <td>-0.103531</td>\n",
       "      <td>9.179623</td>\n",
       "      <td>8.719646</td>\n",
       "      <td>10.917506</td>\n",
       "      <td>...</td>\n",
       "      <td>0.042132</td>\n",
       "      <td>6.153309</td>\n",
       "      <td>8.391258</td>\n",
       "      <td>9.890580</td>\n",
       "      <td>0.049414</td>\n",
       "      <td>8.606465</td>\n",
       "      <td>8.187835</td>\n",
       "      <td>7.874804</td>\n",
       "      <td>10.040271</td>\n",
       "      <td>0.055531</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2020-12-01</td>\n",
       "      <td>18979.867289</td>\n",
       "      <td>9.851134</td>\n",
       "      <td>6.859935</td>\n",
       "      <td>8.186771</td>\n",
       "      <td>0.079442</td>\n",
       "      <td>-0.050733</td>\n",
       "      <td>9.149858</td>\n",
       "      <td>8.722346</td>\n",
       "      <td>10.958312</td>\n",
       "      <td>...</td>\n",
       "      <td>0.038960</td>\n",
       "      <td>6.187652</td>\n",
       "      <td>8.523269</td>\n",
       "      <td>10.015731</td>\n",
       "      <td>0.125151</td>\n",
       "      <td>8.858408</td>\n",
       "      <td>8.465818</td>\n",
       "      <td>8.030338</td>\n",
       "      <td>10.159141</td>\n",
       "      <td>0.118870</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2021-03-01</td>\n",
       "      <td>16273.314400</td>\n",
       "      <td>9.697282</td>\n",
       "      <td>6.660558</td>\n",
       "      <td>8.075925</td>\n",
       "      <td>-0.110846</td>\n",
       "      <td>-0.190288</td>\n",
       "      <td>9.061086</td>\n",
       "      <td>8.468740</td>\n",
       "      <td>10.632316</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.008099</td>\n",
       "      <td>6.220854</td>\n",
       "      <td>8.388785</td>\n",
       "      <td>9.858825</td>\n",
       "      <td>-0.156906</td>\n",
       "      <td>8.651983</td>\n",
       "      <td>8.107396</td>\n",
       "      <td>7.863621</td>\n",
       "      <td>10.073365</td>\n",
       "      <td>-0.085776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2021-06-01</td>\n",
       "      <td>18137.491900</td>\n",
       "      <td>9.805736</td>\n",
       "      <td>6.890753</td>\n",
       "      <td>8.235599</td>\n",
       "      <td>0.159674</td>\n",
       "      <td>0.270520</td>\n",
       "      <td>9.265841</td>\n",
       "      <td>8.854006</td>\n",
       "      <td>10.961106</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.013044</td>\n",
       "      <td>6.252989</td>\n",
       "      <td>8.551038</td>\n",
       "      <td>10.051520</td>\n",
       "      <td>0.192695</td>\n",
       "      <td>8.772798</td>\n",
       "      <td>8.342526</td>\n",
       "      <td>8.158456</td>\n",
       "      <td>10.298673</td>\n",
       "      <td>0.225308</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>2021-09-01</td>\n",
       "      <td>18238.748600</td>\n",
       "      <td>9.811304</td>\n",
       "      <td>6.956559</td>\n",
       "      <td>8.277158</td>\n",
       "      <td>0.041559</td>\n",
       "      <td>-0.118116</td>\n",
       "      <td>9.282531</td>\n",
       "      <td>8.704541</td>\n",
       "      <td>10.992627</td>\n",
       "      <td>...</td>\n",
       "      <td>0.027543</td>\n",
       "      <td>6.285659</td>\n",
       "      <td>8.547552</td>\n",
       "      <td>10.060004</td>\n",
       "      <td>0.008484</td>\n",
       "      <td>8.795129</td>\n",
       "      <td>8.321944</td>\n",
       "      <td>7.617351</td>\n",
       "      <td>10.252133</td>\n",
       "      <td>-0.046540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>2021-12-01</td>\n",
       "      <td>20866.202800</td>\n",
       "      <td>9.945886</td>\n",
       "      <td>6.860005</td>\n",
       "      <td>8.378069</td>\n",
       "      <td>0.100911</td>\n",
       "      <td>0.059353</td>\n",
       "      <td>9.347508</td>\n",
       "      <td>8.480760</td>\n",
       "      <td>10.961281</td>\n",
       "      <td>...</td>\n",
       "      <td>0.027326</td>\n",
       "      <td>6.318780</td>\n",
       "      <td>8.644478</td>\n",
       "      <td>10.153752</td>\n",
       "      <td>0.093748</td>\n",
       "      <td>9.005747</td>\n",
       "      <td>8.465016</td>\n",
       "      <td>7.530357</td>\n",
       "      <td>10.330381</td>\n",
       "      <td>0.078248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2022-03-01</td>\n",
       "      <td>17886.386900</td>\n",
       "      <td>9.791795</td>\n",
       "      <td>6.719769</td>\n",
       "      <td>8.307953</td>\n",
       "      <td>-0.070117</td>\n",
       "      <td>-0.171028</td>\n",
       "      <td>9.283219</td>\n",
       "      <td>8.268384</td>\n",
       "      <td>10.698489</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.007372</td>\n",
       "      <td>6.350839</td>\n",
       "      <td>8.578260</td>\n",
       "      <td>10.037280</td>\n",
       "      <td>-0.116472</td>\n",
       "      <td>8.783024</td>\n",
       "      <td>8.228220</td>\n",
       "      <td>7.394462</td>\n",
       "      <td>7.859645</td>\n",
       "      <td>-2.470736</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>21 rows × 45 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         date           GDP         y        x1        x2   x2_diff  x2_diff2  \\\n",
       "12 2017-03-01  11260.527043  9.329059  6.403112  7.924040 -0.145112 -0.191373   \n",
       "13 2017-06-01  12820.923272  9.458834  6.628625  8.130162  0.206122  0.351234   \n",
       "14 2017-09-01  12576.905083  9.439617  6.719548  8.110193 -0.019969 -0.226092   \n",
       "15 2017-12-01  15744.774602  9.664264  6.681085  8.063217 -0.046976 -0.027006   \n",
       "16 2018-03-01  12500.904859  9.433556  6.454557  7.815691 -0.247526 -0.200550   \n",
       "17 2018-06-01  14024.959955  9.548594  6.722089  7.966795  0.151104  0.398630   \n",
       "18 2018-09-01  14797.511808  9.602214  6.780542  8.057377  0.090583 -0.060521   \n",
       "19 2018-12-01  16679.463378  9.721934  6.721266  8.052105 -0.005272 -0.095855   \n",
       "20 2019-03-01  13746.208200  9.528518  6.478617  7.895250 -0.156856 -0.151584   \n",
       "21 2019-06-01  15291.328500  9.635041  6.710568  8.026824  0.131574  0.288429   \n",
       "22 2019-09-01  15898.690600  9.673992  6.792549  8.049108  0.022284 -0.109290   \n",
       "23 2019-12-01  17525.759000  9.771427  6.780160  8.034048 -0.015060 -0.037344   \n",
       "24 2020-03-01  13118.619000  9.481788  6.261448  7.743447 -0.290600 -0.275540   \n",
       "25 2020-06-01  15924.495500  9.675614  6.771893  7.977153  0.233706  0.524306   \n",
       "26 2020-09-01  16666.081900  9.721131  6.856591  8.107328  0.130175 -0.103531   \n",
       "27 2020-12-01  18979.867289  9.851134  6.859935  8.186771  0.079442 -0.050733   \n",
       "28 2021-03-01  16273.314400  9.697282  6.660558  8.075925 -0.110846 -0.190288   \n",
       "29 2021-06-01  18137.491900  9.805736  6.890753  8.235599  0.159674  0.270520   \n",
       "30 2021-09-01  18238.748600  9.811304  6.956559  8.277158  0.041559 -0.118116   \n",
       "31 2021-12-01  20866.202800  9.945886  6.860005  8.378069  0.100911  0.059353   \n",
       "32 2022-03-01  17886.386900  9.791795  6.719769  8.307953 -0.070117 -0.171028   \n",
       "\n",
       "          x3       x41        x42  ...  x167_diff       x18       x19  \\\n",
       "12  8.629011  8.577826  10.352651  ...  -0.012462  5.713065  8.030145   \n",
       "13  8.802603  8.690898  10.685090  ...  -0.036940  5.739930  8.252161   \n",
       "14  8.781592  8.750994  10.648255  ...   0.028878  5.770498  8.229591   \n",
       "15  8.831691  8.666386  10.665775  ...   0.044971  5.804419  8.331695   \n",
       "16  8.734118  8.651823  10.466293  ...  -0.019966  5.837227  8.089194   \n",
       "17  8.870484  8.777244  10.718629  ...  -0.037061  5.868993  8.309841   \n",
       "18  8.958564  8.839240  10.731633  ...   0.023140  5.905246  8.276681   \n",
       "19  8.911270  8.740820  10.771663  ...   0.019946  5.945481  8.358024   \n",
       "20  8.800214  8.737684  10.523674  ...  -0.024838  5.984159  8.154385   \n",
       "21  8.916509  8.886566  10.776203  ...  -0.052819  6.021397  8.296108   \n",
       "22  9.028938  8.948516  10.792899  ...  -0.016012  6.052049  8.320796   \n",
       "23  9.036131  8.831396  10.844187  ...   0.016951  6.076667  8.421019   \n",
       "24  8.747717  8.069321  10.316623  ...  -0.063459  6.100694  8.063803   \n",
       "25  9.040323  8.377218  10.833200  ...  -0.059554  6.124157  8.376650   \n",
       "26  9.179623  8.719646  10.917506  ...   0.042132  6.153309  8.391258   \n",
       "27  9.149858  8.722346  10.958312  ...   0.038960  6.187652  8.523269   \n",
       "28  9.061086  8.468740  10.632316  ...  -0.008099  6.220854  8.388785   \n",
       "29  9.265841  8.854006  10.961106  ...  -0.013044  6.252989  8.551038   \n",
       "30  9.282531  8.704541  10.992627  ...   0.027543  6.285659  8.547552   \n",
       "31  9.347508  8.480760  10.961281  ...   0.027326  6.318780  8.644478   \n",
       "32  9.283219  8.268384  10.698489  ...  -0.007372  6.350839  8.578260   \n",
       "\n",
       "          x20  x20_diff       x21       x22       x23        x24  x24_diff  \n",
       "12   9.613852 -0.249161  7.885946  7.803159  7.521296   9.363345 -0.159205  \n",
       "13   9.789056  0.175204  8.065793  8.065802  7.939562   9.519962  0.156618  \n",
       "14   9.778969 -0.010087  8.092857  8.050795  7.727623   9.552717  0.032754  \n",
       "15   9.891021  0.112052  8.336537  8.087275  7.892224   9.510778 -0.041938  \n",
       "16   9.657499 -0.233523  8.105646  7.719520  7.532666   9.518847  0.008068  \n",
       "17   9.814157  0.156659  8.222285  7.893353  8.045229   9.669763  0.150917  \n",
       "18   9.811521 -0.002636  8.160084  8.023069  7.706968   9.686991  0.017227  \n",
       "19   9.903152  0.091630  8.414243  8.111863  7.841788   9.741804  0.054813  \n",
       "20   9.675966 -0.227186  8.247914  7.836903  7.388989   9.702099 -0.039704  \n",
       "21   9.769750  0.093785  8.340358  8.101902  7.960844   9.814525  0.112426  \n",
       "22   9.806156  0.036405  8.339365  8.205513  7.765238   9.364262 -0.450263  \n",
       "23   9.894765  0.088609  8.714331  8.340391  7.838552  10.209497  0.845234  \n",
       "24   9.481710 -0.413054  8.308963  7.761259  7.205412   9.602376 -0.607121  \n",
       "25   9.841165  0.359455  8.531676  8.234806  8.071109   9.984740  0.382365  \n",
       "26   9.890580  0.049414  8.606465  8.187835  7.874804  10.040271  0.055531  \n",
       "27  10.015731  0.125151  8.858408  8.465818  8.030338  10.159141  0.118870  \n",
       "28   9.858825 -0.156906  8.651983  8.107396  7.863621  10.073365 -0.085776  \n",
       "29  10.051520  0.192695  8.772798  8.342526  8.158456  10.298673  0.225308  \n",
       "30  10.060004  0.008484  8.795129  8.321944  7.617351  10.252133 -0.046540  \n",
       "31  10.153752  0.093748  9.005747  8.465016  7.530357  10.330381  0.078248  \n",
       "32  10.037280 -0.116472  8.783024  8.228220  7.394462   7.859645 -2.470736  \n",
       "\n",
       "[21 rows x 45 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_new = df.dropna()\n",
    "df_new"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:                      y   R-squared:                       0.944\n",
      "Model:                            OLS   Adj. R-squared:                  0.930\n",
      "Method:                 Least Squares   F-statistic:                     67.49\n",
      "Date:                Wed, 17 Aug 2022   Prob (F-statistic):           8.21e-10\n",
      "Time:                        16:35:47   Log-Likelihood:                 39.446\n",
      "No. Observations:                  21   AIC:                            -68.89\n",
      "Df Residuals:                      16   BIC:                            -63.67\n",
      "Df Model:                           4                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "Intercept      3.6601      0.746      4.908      0.000       2.079       5.241\n",
      "x20            0.2333      0.137      1.697      0.109      -0.058       0.525\n",
      "x21            0.3254      0.060      5.449      0.000       0.199       0.452\n",
      "x22            0.1121      0.110      1.022      0.322      -0.120       0.345\n",
      "x24            0.0034      0.020      0.174      0.864      -0.038       0.045\n",
      "==============================================================================\n",
      "Omnibus:                        0.597   Durbin-Watson:                   1.098\n",
      "Prob(Omnibus):                  0.742   Jarque-Bera (JB):                0.623\n",
      "Skew:                           0.336   Prob(JB):                        0.732\n",
      "Kurtosis:                       2.490   Cond. No.                     1.49e+03\n",
      "==============================================================================\n",
      "\n",
      "Notes:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n",
      "[2] The condition number is large, 1.49e+03. This might indicate that there are\n",
      "strong multicollinearity or other numerical problems.\n"
     ]
    }
   ],
   "source": [
    "#线性回归\n",
    "results1 = smf.ols('y ~  x20+ x21+ x22+ x24', data=df_new).fit()\n",
    "print(results1.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "float() argument must be a string or a number, not 'RegressionResultsWrapper'",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mTypeError\u001B[0m                                 Traceback (most recent call last)",
      "Input \u001B[1;32mIn [13]\u001B[0m, in \u001B[0;36m<cell line: 2>\u001B[1;34m()\u001B[0m\n\u001B[0;32m      1\u001B[0m results1\u001B[38;5;241m.\u001B[39mpredict(df[[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mx20\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mx21\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mx22\u001B[39m\u001B[38;5;124m'\u001B[39m,\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mx24\u001B[39m\u001B[38;5;124m'\u001B[39m]])\n\u001B[1;32m----> 2\u001B[0m points\u001B[38;5;241m=\u001B[39m\u001B[43mnp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43marray\u001B[49m\u001B[43m(\u001B[49m\u001B[43mresults1\u001B[49m\u001B[43m,\u001B[49m\u001B[43mdtype\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mnp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mfloat32\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m      3\u001B[0m \u001B[38;5;28mprint\u001B[39m(points)\n\u001B[0;32m      4\u001B[0m data \u001B[38;5;241m=\u001B[39m MaxMinNormalization(results1, \u001B[38;5;241m19431\u001B[39m, \u001B[38;5;241m8173\u001B[39m)\n",
      "\u001B[1;31mTypeError\u001B[0m: float() argument must be a string or a number, not 'RegressionResultsWrapper'"
     ]
    }
   ],
   "source": [
    "pt = results1.predict(df[['x20', 'x21', 'x22','x24']])\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}